#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableSailorModelSkinTransDao:DaoBase<TableSailorModelSkinTrans>
    {
        public override string GetFileName()
        {
            return "TableSailorModelSkinTrans.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableSailorModelSkinTrans>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableSailorModelSkinTrans model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.MSTId)) UnityEngine.Debug.LogError("数据表id重复:TableSailorModelSkinTrans->id: " + model.MSTId);
            #endif
            cachePrimaryInt[model.MSTId] = model;
        }
        protected override TableSailorModelSkinTrans ParseRowData(string[] rowData)
        {
            TableSailorModelSkinTrans data = new TableSailorModelSkinTrans();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.MSTId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.MAId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.FromMSId = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.ToMSId = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.IsTransSpecifyTime = int.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.TransStartTime = double.Parse(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.TransDuration = double.Parse(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.LowMSId = int.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.LowToMSId = int.Parse(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.LowIsTransSpecifyTime = int.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.LowTransStartTime = double.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.LowTransDuration = double.Parse(rowData[11]);
            }
            return data;
        }
    }
}
